<template>
  <div>
    <div @click="test">点击打招呼</div>
  </div>
</template>
<script>
export default {
  name: "Demo",
  props: ["name", "age"],
  setup(props, context) {
    console.log(props);
    console.log(context.slots);
    let test = () => {
      context.emit("hello", "666");
    };

    return { test };
  },
};
</script>